﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zor_Modes;
using Zor_IDAL;
using Zor_Tools;

namespace Zor_DAL
{
    public class PrayWarn_DAL<T> where T : class
    {

        /// <summary>
        /// 
        /// create 刘云飞 by 2017/04/10 
        /// </summary>
        /// <returns></returns>
        public static List<T> SelectViewPrayWarn(string where = null)
        {

            var sql = "select * from V_PrayWarn where  Dt_Id = " + RequestSession.GetSessionUser().DT_Id + " order by Lease_Id ";
            return DapperQuery<T>.DoQueryList(sql, null);
        }

        /// <summary>
        /// 
        /// create 刘云飞 by 2017/04/10 
        /// </summary>
        /// <returns></returns>
        public static List<T> SelectViewPrayAcceptance(string where = null)
        {

            var sql = "select * from V_PrayAcceptance where " + where + " order by Acceptance_Id ";
            return DapperQuery<T>.DoQueryList(sql, null);
        }
    }
}
